package com.wiloon.cherry.entity;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

import java.io.Serializable;
import java.util.Date;

/**
 * Created by wiloon on 7/25/14.
 */
@DatabaseTable(tableName = "language")  //tableName
public class Language implements Serializable {
    public static final String ID = "language_id";
    public static final String NAME = "language_name";
    public static final String ADD_DATE = "add_date";
    public static final String ADD_BY = "add_by";
    public static final String UPDATE_DATE = "update_date";
    public static final String UPDATE_BY = "update_by";
    @DatabaseField(generatedId = true, useGetSet = true, columnName = ID)
    private int id;

    @DatabaseField(useGetSet = true, columnName = NAME)
    private String name;

    @DatabaseField(foreignColumnName = User.ID, foreign = true, foreignAutoCreate = true, columnName = ADD_BY)
    private User addBy;

    @DatabaseField(useGetSet = true, columnName = ADD_DATE)
    private Date addDate;

    @DatabaseField(foreignColumnName = User.ID, foreign = true, foreignAutoCreate = true, columnName = UPDATE_BY)
    private User updateBy;

    @DatabaseField(useGetSet = true, columnName = UPDATE_DATE)
    private Date updateDate;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public User getAddBy() {
        return addBy;
    }

    public void setAddBy(User addBy) {
        this.addBy = addBy;
    }

    public Date getAddDate() {
        return addDate;
    }

    public void setAddDate(Date addDate) {
        this.addDate = addDate;
    }

    public User getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(User updateBy) {
        this.updateBy = updateBy;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }
}